package lanqiao;

import java.io.File;
public class demo3 {
	public static void main(String[] args) {
		File f = new File("D:" + File.separator);
		printPathFile(f);

	}

	public static void printPathFile(File f) {
		if (f != null) {
			
			if (f.isDirectory()) {
				File[] listFiles = f.listFiles();
				if (listFiles != null) {
					for (int i = 0; i < listFiles.length; i++) {
						printPathFile(listFiles[i]);
					}
				}
			}
			
		}
		System.out.println(f);
	}

}
